home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr27 / gs26.zip / MAKE.DOC < prev    next >
Text File  |  1993-05-07  |  26KB  |  607 lines

  1.    Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.
  19.  
  20. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  21.  
  22. This file, make.doc, describes how to install Ghostscript, and how to
  23. build Ghostscript executables from source.
  24.  
  25. For an overview of Ghostscript and a list of the documentation files, see
  26. README.
  27.  
  28. ********
  29. ******** Installing Ghostscript
  30. ********
  31.  
  32. To install the interpreter, you need:
  33.     - The interpreter executable:
  34.         - On MS-DOS and VMS systems, gs.exe.
  35.         - On MS-DOS systems, if you are using the Watcom compiler,
  36.           the DOS extender, dos4gw.exe.
  37.         - On Unix systems, gs.
  38.     - The interpreter initialization files:    gs_*.ps.
  39.     - The font map: Fontmap.
  40.     - The default font: uglyr.gsf.
  41.  
  42. See use.doc for a description of the search algorithm used to find these
  43. files.
  44.  
  45. You do not need any of these files when using the library; however, the
  46. library currently provides no way to install fonts.  This is obviously
  47. ridiculous and will be fixed sometime in the future.
  48.  
  49. ********
  50. ******** Building Ghostscript from source
  51. ********
  52.  
  53. Ghostscript is generally distributed in the form of a compressed tar file.
  54. When unpacked, this file puts all the Ghostscript files in a directory
  55. called gs.  Ghostscript is also available in the form of PC-compatible ZIP
  56. files.
  57.  
  58. Ghostscript is described by a collection of several makefiles:
  59.  
  60.     gs.mak - a generic makefile used on all platforms (except VMS).
  61.     devs.mak - a makefile listing all the device drivers.
  62.     *.mak - the makefiles for specific platforms.
  63.  
  64. You may need to edit the platform-specific makefile if you wish to change
  65. any of the following options:
  66.  
  67.     - The default search path(s) for the initialization and font files
  68. (macro GS_LIB_DEFAULT);
  69.  
  70.     - The debugging options (macro TDEBUG);
  71.  
  72.     - The set of device drivers to be included (DEVICE_DEVS
  73.     and DEVICE_DEVS1..9 macros);
  74.  
  75.     - The set of optional features to be included (FEATURE_DEVS macro).
  76.  
  77. The platform-specific makefile will include comments describing all of
  78. these items except the DEVICE_DEVS options.  The DEVICE_DEVS options are
  79. described in devs.mak, even though the file that must be edited is the
  80. platform-specific makefile.
  81.  
  82. The makefiles distributed with Ghostscript define these options as
  83. follows:
  84.  
  85.     - GS_LIB_DEFAULT: on Unix systems, /usr/local/lib/ghostscript
  86. and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS.
  87.  
  88.     - TDEBUG: no debugging code included in the build.
  89.  
  90.     - DEVICE_DEVS*: platform-specific, see below.
  91.  
  92.     - FEATURE_DEVS: platform-specific.
  93.  
  94. There are also platform-specific options described below under the
  95. individual platforms.  See the "Options" section near the beginning of the
  96. relevant makefile for more information.
  97.  
  98. If you are including a dot-matrix printer driver, you may wish to
  99. customize the default resolution parameters in devs.mak.
  100.  
  101. To build the interpreter, you need all the .h and .c files (and .asm files
  102. for MS-DOS) included in the distribution, as well as the makefiles.
  103.  
  104. The command
  105.     make clean
  106. removes all the files created by the build process (relocatables,
  107. executables, and miscellaneous scratch files).  If you want to save the
  108. executable, you should move it to another directory first.
  109.  
  110. ********
  111. ******** How to build Ghostscript from source (MS-DOS version) ********
  112. ********
  113.  
  114. To find out what devices the makefiles distributed with Ghostscript
  115. select for inclusion in the executable, find the lines in the
  116. appropriate makefiles of the form
  117.     FEATURE_DEVS=<list of features>
  118. and
  119.     DEVICE_DEVS=<list of devices>
  120.     (similarly DEVICE_DEVS1... up to DEVICE_DEVS9)
  121. The relevant makefiles are:
  122.     Turbo C: tc.mak
  123.     Turbo C++/Borland C++, MS-DOS: bc.mak
  124.     Borland C++, MS Windows: bcwin.mak
  125.     Microsoft C/C++ 7.0, MS-DOS: msc.mak
  126.     Watcom C/386, MS-DOS: watc.mak
  127. The options were chosen to strike a balance between RAM consumption
  128. and likely usefulness.  (Turbo C is limited to 640K and does not
  129. support code overlaying; Borland C++ is limited to 640K, but supports
  130. code overlaying under MS-DOS; Watcom C/386 is not limited to 640K.)
  131.  
  132. To build Ghostscript, you need MS-DOS version 3.3 or later, and a
  133. (Borland) Turbo C/C++, Borland C/C++, Microsoft C/C++ (version 7), or
  134. Watcom C/386 development system.  Details are given below.
  135.  
  136. As noted above, the default configuration generates an executable that
  137. assumes the directory where 'make' was run should be the final default
  138. directory for looking up the Ghostscript initialization and font files.
  139.  
  140. To build the Ghostscript executable, all you need to do is give the
  141. command
  142.     make
  143. You must have COMMAND.COM in your path to build Ghostscript.
  144.  
  145. There is a special 'make' target that simply attempts to compile all the
  146. .c files in the current directory.  Some of these compilations will fail,
  147. but the ones that succeed will go considerably faster, because they don't
  148. individually pay the overhead of loading the compiler into memory.  So a
  149. good strategy for building the executable for the first time, or after a
  150. change to a very widely used .h file, is:
  151.     make begin
  152. and then
  153.     make
  154. to do the compilations that failed the first time.
  155.  
  156. Note: if you get the Ghostscript sources from a Unix 'tar' file and unpack
  157. the file on a MS-DOS machine, the files will all have linefeed instead of
  158. carriage return + linefeed as the line terminator, which may make the C
  159. compiler unhappy.  I don't know the simplest way to fix this: just reading
  160. each file into an editor and writing it back out again may be sufficient.
  161. You will probably have to do this to the .c, .h, and .bat files.
  162.  
  163. Borland environment
  164. -------------------
  165.  
  166. To compile Ghostscript with the Borland environment, you need either Turbo
  167. C (version 2.0 or later) or Turbo C++ or Borland C++ (version 1.0 or
  168. later); specifically, the compiler, 'make' utility, and linker.  You also
  169. need either the Borland assembler (version 1.0 or later) or the Microsoft
  170. assembler (version 4.0 or later).  Before compiling or linking, you should
  171. execute
  172.     echo !include "tc.mak" >makefile
  173. (for Turbo C and MS-DOS), or
  174.     echo !include "bc.mak" >makefile
  175. (for Turbo C++ or Borland C++ and MS-DOS), or
  176.     echo !include "bcwin.mak" >makefile
  177. (for Turbo C++ or Borland C++ and Microsoft Windows), or
  178.  
  179. Besides the source files and the makefiles, you need:
  180.     turboc.cfg (the flags and switches for Turbo C)
  181.     gs.tr (the linker commands for the interpreter)
  182.     *.bat (a variety of batch files used in the build process)
  183.  
  184. There are extensive comments in the aforementioned .mak files
  185. regarding various configuration parameters.  If your configuration is
  186. different from the following, you should definitely read those
  187. comments and see if you want or need to change any of the parameters:
  188.     - The compiler files are in c:\tc (for Turbo C) or c:\bc (for
  189. Turbo C++ or Borland C++) and its subdirectories.
  190.     - You are using the Borland assembler (tasm).
  191.     - You want an executable that will run on any PC-compatible,
  192. regardless of processor type (8088, 8086, V20, 80186, 80286, V30, 80386,
  193. 80486) and regardless of whether a math coprocessor (80x87) is present.
  194.  
  195. NOTE: Borland C++ 3.0 has two problems that affect Ghostscript (these
  196. problems are fixed in Borland C++ 3.1):
  197.  
  198.     - The assembler, tasm, often crashes when attempting to
  199. assemble gdevegaa.asm.  If this happens, try again, or use another
  200. assembler (e.g., an older version of tasm) if you have one, or set
  201. USE_ASM=0 in the makefile.
  202.  
  203.     - The math library for Microsoft Windows, mathwl.lib, has a
  204. bug that causes floating point numbers to print incorrectly.  Contact
  205. Borland for a corrected version.
  206.  
  207. If you are compiling Ghostscript with Turbo C++ 1.0, remove the
  208. `.swap' directive from bc.mak, and use the -s switch on the `make'
  209. command line.  (All later versions of the Borland environment
  210. recognize this directive.)
  211.  
  212. Note that although the Microsoft Windows version of Ghostscript will
  213. run under Windows 3.0, it uses routines from the Windows 3.1 SDK, so
  214. you need the Windows 3.1 SDK and header files to compile it.  In
  215. practice, this means that you need Borland C++ 3.1; Borland C++ 3.0
  216. doesn't include the necessary headers.
  217.  
  218. Microsoft environment
  219. ---------------------
  220.  
  221. To compile Ghostscript with the Microsoft environment, you need
  222. Microsoft C/C++ 7.0 or later with its associated `nmake' utility and
  223. linker.  Before compiling or linking, you should execute
  224.     echo !include msc.mak >makefile
  225.  
  226. Besides the source files and the makefiles, you need:
  227.     gs.tr (the linker commands for the interpreter)
  228.     *.bat (a variety of batch files used in the build process)
  229.  
  230. We have found the Microsoft `nmake' program to be very unreliable; it
  231. may crash partway through the build process with a variety of error
  232. messages, or no error message.  
  233.  
  234. We have not been able to test the Microsoft compiler in a wide
  235. variety of configurations, because it is so much slower than the
  236. Borland compiler (about 5 times) and because there is apparently no
  237. way to get it to write its error messages to a file.  If you
  238. encounter problems with the Microsoft environment, please contact
  239. Aladdin Enterprises.
  240.  
  241. Watcom environment
  242. ------------------
  243.  
  244. To avoid annoying messages from the DOS extender, add the line
  245.     set DOS4G=quiet
  246. to your autoexec.bat file. 
  247.  
  248. To compile Ghostscript with the Watcom C/386 compiler, you need to create
  249. a makefile by executing
  250.  
  251.     echo !include watc.mak >makefile
  252.  
  253. To build Ghostscript, execute
  254.  
  255.     wmake -u
  256.  
  257. ********
  258. ******** How to build Ghostscript from source (Unix version) ********
  259. ********
  260.  
  261. The makefile distributed with Ghostscript selects the following devices
  262. for inclusion in the build:
  263.     Display: X Windows driver.
  264.     File output: pbm, pbmraw, pgm, pgmraw, ppm, and ppmraw drivers.
  265.  
  266. Before compiling or linking, you should execute
  267.  
  268.     ln -s unix-cc.mak makefile
  269. or    ln -s unix-gcc.mak makefile
  270. or    ln -s unix-ansi.mak makefile
  271.  
  272. (if your Unix system doesn't support symbolic links, omit the -s switch)
  273. depending on whether your C compiler is a standard Kernighan & Ritchie C
  274. compiler, gcc being used in ANSI mode, or an ANSI C compiler other than
  275. gcc respectively.  (If you want to use gcc in non-ANSI mode, use
  276. unix-cc.mak and define the CC macro to refer to gcc.)
  277.  
  278. The unix-*.mak files are actually generated mechanically from *head.mak,
  279. *tail.mak, gs.mak, and devs.mak.  If for some reason your copy of
  280. Ghostscript doesn't include the unix-*.mak files, invoke the
  281.     tar_cat
  282. shell script to construct them.
  283.  
  284. If the X11 client header files are located in some directory which your
  285. compiler does not automatically search, you must change the XINCLUDE macro
  286. the makefile to include a specific -I switch.  See the comment preceding
  287. XINCLUDE in the makefile.
  288.  
  289. The only important customization of the X11 driver is the choice of
  290. whether or not to use a backing pixmap.  If you use a backing pixmap,
  291. Ghostscript windows will redisplay properly when they are covered and
  292. exposed, but drawing operations will go slower.  This choice is controlled
  293. by a line in the file gdevxini.c that says
  294.     private int use_backing = 1;
  295. Changing this line to read
  296.     private int use_backing = 0;
  297. will disable the use of a backing pixmap.  However, portions of the
  298. Ghostscript window may not be properly redrawn after the window is
  299. restored from an icon or exposed after being occluded by another window.
  300.  
  301. Some versions of the X server do not implement tiling properly.  This will
  302. show up as broad bands of color where dither patterns should appear.  If
  303. this happens, in the file gdevx.c, change
  304.     private int use_XSetTile = 1;
  305. to
  306.     private int use_XSetTile = 0;
  307. and recompile.  The result will run a lot slower, but the output should be
  308. correct.  If this fixes the problem, report it to whoever made your X
  309. server.
  310.  
  311. Similarly, some versions of the X server do not implement bitmap/pixmap
  312. displaying properly.  This may show up as white or black rectangles where
  313. characters should appear, or characters may appear in "inverse video"
  314. (e.g., white on a black rectangle).  If this happens, it may help you to
  315. change, in the file gdevx.c,
  316.     private int use_XPutImage = 1;
  317. to
  318.     private int use_XPutImage = 0;
  319. and recompile.  Again, there will be a serious performance penalty; again,
  320. if this fixes the problem, notify the supplier of your X server.
  321.  
  322. Currently Ghostscript is set up to compile and link in a generic Unix
  323. environment.  Some Unix environments may require changing the LDFLAGS
  324. macro in the makefile.
  325.  
  326. All you need to do to make an executable is invoke the shell command
  327.     make
  328.  
  329. Ghostscript uses ANSI syntax for function definitions. Because of this,
  330. when compiling with cc, it must preprocess each .c file to convert it to
  331. the older syntax defined in Kernighan and Ritchie, which is what most
  332. current Unix compilers (other than gcc) support.  This step is
  333. automatically performed by a utility called ansi2knr, which is included in
  334. the Ghostscript distribution.  The makefile automatically builds ansi2knr.
  335.  
  336. The ansi2knr preprocessing step is included in the makefile rule for
  337. compiling .c files.  ansi2knr creates a file called _temp_.c to hold the
  338. converted code.  If you want to change this name for some reason, it is
  339. defined in unix-cc.mak.
  340.  
  341. Platform-specific notes
  342. -----------------------
  343.  
  344. 386 Unix:
  345.     gcc versions older than 1.38 on Intel 80386 systems do not
  346. compile Ghostscript correctly using the -O option.  Do not use -O in
  347. these environments.
  348.     gcc 1.39 under 386BSD has a bug that causes float-to-integer
  349. conversions to compile incorrectly.  Do not use this version of gcc.
  350.     X11R5 may need #include <stddef.h> in x_.h.
  351.     Also see below regarding System V platforms.
  352.  
  353. Apollo:
  354.     You must run the compiler in ANSI-compatible mode (i.e., set AK=
  355. <null string> in the makefile); otherwise, it gives incorrect error
  356. messages for any function declared as returning a float value.
  357.     The Apollo compiler may not compile Ghostscript correctly.  If you
  358. get unexpected crashes at run time, use gcc.
  359.  
  360. Convex:
  361.     Use unix-ansi.mak.  Do not invoke optimization (-O1): there
  362. are compiler bugs that lead to incorrect code.  Set CFLAGS to
  363.     -fn -tm -no c1
  364.  
  365. DEC (Ultrix):
  366.     Many versions of DEC's X server (DECwindows) have bugs that
  367. require setting use_XPutImage or use_XSetTile to 0, as described above.
  368.  
  369. GNU make (any platform):
  370.     GNU make 3.59 can't handle the final linking step in some cases;
  371. use the platform's standard make (e.g., /bin/make) if this happens.
  372.  
  373. H-P 700 series:
  374.     Use the compiler flags -Aa +O3 (*not* -O).
  375.  
  376. ISC Unix:
  377.     For ISC Unix with gcc, an appropriate make invocation is:
  378.     make XCFLAGS="-D__SVR3 -posix" LDFLAGS="-shlib -posix" \
  379.          EXTRALIBS="-linet -lnsl_s"
  380. If this doesn't work for you, try removing the -shlib.  ISC Unix may
  381. also need one or more of the following in EXTRALIBS: -lpt, -lc_s.
  382. See also under "386 Unix" above.
  383.  
  384. MIPS:
  385.     There is apparently a bug in the MIPS C compiler which causes
  386. gxdither.c to compile incorrectly if optimization is enabled (-O).  Until
  387. a work-around is found, do not use -O with the MIPS C compiler.
  388.  
  389. NeXT:
  390.     Use unix-gcc.mak, but change the name of the compiler (CC=)
  391. from gcc to cc.  Also, include -D_NEXT_SOURCE in CFLAGS, and change
  392. the two occurrences of sys/time.h to ansi/time.h.  You may also find
  393. it useful to add the following line to Fontmap:
  394.         /Ohlfs    /Courier    ;
  395.  
  396. RS/6000:
  397.     Due to compiler bugs, most of the obvious ways to compile
  398. Ghostscript on the RS/6000 don't work.  You should use the following
  399. command line, or a similar one with a different compiler (see below):
  400.  
  401.     make -f unix-ansi.mak CC=c89 \
  402.     XINCLUDE=-I/usr/misc/X11/include XLIBDIRS=-L/usr/misc/X11/lib
  403.  
  404. You must also edit the makefile (unix-ansi.mak or unix-cc.mak) to define
  405. CFLAGS as -DSYSV -D_POSIX_SOURCE, and to change INSTALL to
  406. /usr/ucb/install.  (If -DSYSV produces a complaint about the functions
  407. index and rindex not being defined, try removing it.)
  408.  
  409. Even beyond all this, many people have trouble with Ghostscript on
  410. the RS/6000.  The usual symptom is that it compiles and links OK, but
  411. produces garbaged output on the screen.  The problem may be related
  412. to particular versions of AIX or the X server; we don't have enough
  413. information at this time.  The following combinations of AIX and X
  414. are known to fail:
  415.     AIX 3.1.5, MIT X11R4, c89, unix-ansi.mak
  416.     AIX 3.2.0 or 3.2.1, c89 or xlc
  417. The following combinations are known to work:
  418.     AIX 3.1.5, MIT X11R5, c89, unix-ansi.mak
  419.     AIX 3.2, MIT X11R5, xlc 1.2.0.9, unix-ansi.mak
  420.     AIX 3.2, c89, unix-ansi.mak -- but you must compile
  421.       without optimization (no -O)
  422.     AIX 3.2.0 or 3.2.1, cc, unix-cc.mak, no -O
  423.  
  424. Apparently some (but not all) releases of the C library declare the hypot
  425. function: if the declaration in math_.h produces an error message, try
  426. removing it.  Also, the IBM X11R3 server is known to be buggy: use the MIT
  427. X server if possible.
  428.  
  429. SCO Unix/Xenix:
  430.     The SCO Unix C compiler apparently can't handle the Pn macros
  431. in std.h.  If you get strange compilation errors on SCO Unix, see if
  432. you can get a compiler fix from SCO.  Meanwhile, to use gcc with SCO
  433. ODT, see gcc-head.mak for the appropriate switch settings.  See also
  434. under "386 Unix" above.
  435.     gcc 2.3.3 produces code that causes a core dump on machines
  436. that don't have hardware floating point, because of a bug in SCO's
  437. floating point emulator.  Use a different compiler on these machines.
  438.     If you aren't using the X11 driver, you need to add -lsocket
  439. to the linker command (near the end of the unix-*.mak file) in order
  440. to get the date/time functions linked in.
  441.     If you want to use direct frame buffer addressing instead of
  442. X Windows, include the relevant frame buffer device(s) (ega.dev,
  443. vga.dev, etc.) and change gdevevga.c to gdevsco.c as indicated in
  444. devs.mak.  Note: this does not work with SuperVGA displays, except
  445. for 800x600x16 mode.
  446.     If your compiler accepts the -Xt and -Xa switches, use -Xt.
  447. Even though this causes the compiler to use incorrect rules for
  448. computing the result types of << and >>, -Xa enables "optimizations"
  449. that produce incorrect code.
  450.     For SCO ODT 2.0, in addition to -D__SVR3 and -DSYSV, you need to
  451. specify -Dsco, -DUSG, and -DMALLOC_0_RETURNS_NULL.  For SCO ODT, you need
  452. EXTRALIBS=-lX11 -lsocket -lmalloc, or maybe only -lsocket (depending on
  453. the version), and for SCO ODT 2.0, you also need to specify -lc_s.  For
  454. SCO Xenix, you need EXTRALIBS=-lmalloc.
  455.     For all SCO systems, set XINCLUDE= and XLIBDIRS=.
  456.  
  457. Sun:
  458.     The Sun unbundled C compiler (SC1.0) doesn't compile Ghostscript
  459. properly if the -fast option is selected: Ghostscript core-dumps in
  460. build_gs_font.  Use -g, or use gcc.
  461.     The Sun version of dbx often gives up with an error message when
  462. trying to load Ghostscript.  If this happens, use gdb instead.  (gdb is
  463. more reliable than dbx in other ways as well.)
  464.  
  465. System V Unix platforms:
  466.     If you are using a stock System V platform that lacks rename
  467. and gettimeofday, change PLATFORM=unix_ in the makefile to
  468. PLATFORM=sysv_.
  469.  
  470. ********
  471. ******** How to build Ghostscript from source (VAX/VMS version) ********
  472. ********
  473.  
  474. The files VMS-CC.MAK and VMS-GCC.MAK are VMS DCL command files which
  475. build Ghostscript from scratch using either the DEC C compiler, CC, or
  476. the Free Software Foundation's GNU C compiler, GCC.  Accordingly, you
  477. must have one of these two compilers installed in order to build
  478. Ghostscript.  (Other C compilers may work: CC and GCC are the only two
  479. compilers tested to date.)  These two command files build and store
  480. the Ghostscript library in the object library GS.OLB.  If you have
  481. DECwindows (X11) installed on your system, the executable images GS.EXE,
  482. GT.EXE, and XLIB.EXE will also be built.
  483.  
  484. Some environments use the DWTLIBSHR library for providing the X
  485. Windows intrinsics, and some use the XTSHR library.  XTSHR is newer,
  486. and is part of the DECwindows/Motif product.  However, DEC is still
  487. distributing versions of VMS with DWTLIBSHR.  If your environment
  488. uses XTSHR, replace DWTLIBSHR in the list of link libraries with
  489. XTSHR.
  490.  
  491. The only important customization of the X11 driver is the choice of
  492. whether or not to use a backing pixmap.  If you use a backing pixmap,
  493. Ghostscript windows will redisplay properly when they are covered and
  494. exposed, but drawing operations will go slower.  This choice is controlled
  495. by the line in the file gdevx.c that reads
  496.     private int use_backing = 1;
  497. Changing this line to read
  498.     private int use_backing = 0;
  499. will disable the use of a backing pixmap.  However, portions of the
  500. Ghostscript window may not be properly redrawn after the window is
  501. restored from an icon or exposed after being occluded by another window.
  502.  
  503. Many versions of DEC's X server (DECwindows) have bugs that require
  504. setting use_XPutImage or use_XSetTile to 0, as described above.  These
  505. show up as broad bands of color where dither patterns should appear, or
  506. characters displayed white on top of black rectangles or not displayed at
  507. all.  If this happens, change use_XSetTile or use_XPutImage to 0 as
  508. described above.  The result will run a lot slower, but the output will be
  509. correct.  Report the problem to DEC, or whoever supplied your X server.
  510.  
  511. Ghostscript uses ANSI syntax for function definitions. Thus, when using
  512. the DEC C compiler, each .C file is converted to the older C syntax defined
  513. in the first edition of Kernighan and Ritchie and stored in a .CC file.
  514. This step is performed by VMS-CC.MAK using the ansi2knr utility included
  515. in the Ghostscript distribution.  If you are building a debuggable
  516. configuration, the .CC files will be left behind by VMS-CC.MAK for use by
  517. the VMS Debugger; otherwise, they will be deleted.
  518.  
  519. If you have DEC's C compiler, issue the DCL command
  520.         $ @VMS-CC.MAK
  521. to build Ghostscript.  If you have GNU C, issue the DCL command
  522.         $ @VMS-GCC.MAK
  523. to build Ghostscript.
  524.  
  525. The option "DEBUG" may be specified with either command file in order to
  526. build a debuggable Ghostscript configuration:
  527.         $ @VMS-CC.MAK DEBUG    -or-   $ @VMS-GCC.MAK DEBUG
  528.  
  529. In order to specify switches and file names when invoking the interpreter,
  530. define GS as a foreign command:
  531.         $ GS == "$disk:[directory]GS.EXE"
  532. where "disk" and "directory" specify the disk and directory where Ghostscript
  533. is located.  For instance,
  534.         $ GS == "$DUA1:[GHOSTSCRIPT]GS.EXE"
  535. To allow the interpreter to be run from any directory, define the logical
  536. GS_LIB which points to the Ghostscript directory
  537.         $ DEFINE GS_LIB disk:[directory]
  538. This allows Ghostscript to locate its initialization files stored in the
  539. Ghostscript directory -- see use.doc for further details.  Finally, to
  540. invoke the interpreter, merely type GS.  Although DCL normally converts
  541. unquoted parameters to upper case, C programs receive their parameters in
  542. lower case.  That is, the command
  543.         $ GS -Isys$login:
  544. passes the switch "-isys$login" to the interpreter.  To preserve the
  545. case of switches, enclose them in double quotes; e.g.,
  546.         $ GS "-Isys$login:"
  547.  
  548. If you add compiled fonts to your system as described in the fonts.doc
  549. file, you must C-compile them in an environment that includes some
  550. definitions from vms-cc.mak.  Find the section of vms-cc.mak with the
  551. comment "Give ourself a healthy search list for C include files" and
  552. execute the immediately following DEFINE commands before C-compiling the
  553. fonts.
  554.  
  555. ********
  556. ******** A guide to the files ********
  557. ********
  558.  
  559. General
  560. -------
  561.  
  562. There are very few machine dependencies in Ghostscript.  A few of the .c
  563. files are machine-specific.  These have names of the form
  564.     gp_<platform>.c
  565. specifically
  566.     gp_dosfb.c (all MS-DOS platforms)
  567.     gp_msdos.c (all MS-DOS platforms)
  568.     gp_itbc.c (MS-DOS, Borland compilers)
  569.     gp_iwatc.c (MS-DOS, Watcom or Microsoft compiler)
  570.     gp_unix.c (all Unix)
  571.     gp_sysv.c (System V Unix)
  572.     gp_vms.c (VMS)
  573. There are also some machine-specific conditionals in files with names
  574. <something>_.h.  If you are going to extend Ghostscript to new
  575. machines or operating systems, you should check the *_.h files for
  576. ifdef's on things other than DEBUG, and you should probably count on
  577. making a new makefile and a new gp_ file.
  578.  
  579. Library
  580. -------
  581.  
  582. Files beginning with gs, gx, or gz (both .c and .h), other than gs.c
  583. and gsmain.c, are the Ghostscript library.  Files beginning with gdev
  584. are device drivers or related code, also part of the library.  Other
  585. files beginning with g are library files that don't fall neatly into
  586. either the kernel or the driver category.
  587.  
  588. Interpreter
  589. -----------
  590.  
  591. gs.c is the main program for the language interpreter.
  592.  
  593. Files beginning with z are Ghostscript operator files.  The names of the
  594. files generally follow the section headings of the operator summary in
  595. section 6.2 of the PostScript manual.
  596.  
  597. .c files beginning with i, and .h files not beginning with g, are the
  598. rest of the interpreter.  See the makefile for a little more information
  599. on how the files are divided functionally.
  600.  
  601. There are a few files that are logically part of the interpreter, but that
  602. are potentially useful outside Ghostscript, whose names don't begin with
  603. either g, z, or i:
  604.  
  605.     s*.c (a flexible stream package, including the Level 2 PostScript
  606. 'filters' supported by Ghostscript);
  607.